Fix contributor index switch button label white space preservation - #2762
Open
richardebeling wants to merge 1 commit into
Open
Fix contributor index switch button label white space preservation#2762richardebeling wants to merge 1 commit into
richardebeling wants to merge 1 commit into
Conversation
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



In #2736, we introduced additional in-html whitespace in the switch button label on the contributor index page. However, in #2054, we added the classes
text-break break-spacesto the button label, which applies this CSS:Now, this unintuitively does not mean "break my text at whitespaces". It also preserves original breaking whitespaces (aka newlines). So, the two newlines our formatting added are also included in the div, causing the switch button to look like this:

I think we should get rid of this
break-spacesclass since it does not do what people would expect it to do. To still make our text wrap here, I discussed with @janno42 and we agreed that we should probably just allow text wrapping in.btn-switch-label.